package com.open.capacity.db.controller;

import com.open.capacity.common.exception.controller.ControllerException;
import com.open.capacity.common.web.PageResult;
import com.open.capacity.db.service.FieldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/tableField")
public class TableFieldController {

    @Autowired
    FieldService fieldService;

    @GetMapping("/getTableFieldList")
    public PageResult getTableFieldList(@RequestParam Map map){
        try {
            return fieldService.getTableFieldList(map);
        }catch (ControllerException e){
            throw new ControllerException(e);
        }

    }
}
